package top.huanyv.tools.enums;

public enum ResponseStatus implements HttpStatus {

    SUCCESS(200, "请求成功"),
    FAIL(500, "请求失败"),

    OK(200, "请求成功"),
    UNAUTHORIZED(401, "未登录"),
    FORBIDDEN(403, "没有权限"),
    NOT_FOUND(404, "资源不存在"),
    SERVER_ERROR(500, "服务器内部错误");

    private int code;
    private String msg;

    ResponseStatus(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
